<template>
  <div class="goodsItem">
    <div class="px-2 py-2 d-flex justify-content-start align-items-center" @click="$router.push(`/prodetail/${item.goods_id}`)">
      <img :src="item.goods_image" alt="">
      <div class="ms-3">
        <p class="mb-2 text-ellipsis fontSize-18">{{item.goods_name}}</p>
        <p class="mb-2 text-muted fontSize-14">已售:{{item.goods_sales}}件</p>
        <p class="mb-0 text-danger fontSize-18">￥{{item.goods_price_min}} <del class="text-black-50 fontSize-14">￥{{item.goods_price_max}}</del></p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'goodsList',
  props: {
    item: {
      type: Object,
      default: () => {}
    }
  }
}
</script>

<style lang="less" scoped>
  .goodsItem {
    img{
      width: 140px;
      height: 100%;
      object-fit: contain;
    }
  }
</style>
